﻿@model IEnumerable<blacksoft.Models.ArqueoDeCaja>

@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_LayoutVentas.cshtml";
}

@if (TempData["create_success"] != null)
{
    <div class="success grid_12">
        <h3>Nuevo: @TempData["create_success"].</h3>
        <a class="hide_btn" href="#"></a>
    </div>
}
else if (TempData["edit_success"] != null)
{
    <div class="success grid_12">
        <h3>Modificar: @TempData["edit_success"].</h3>
        <a class="hide_btn" href="#"></a>
    </div>
}
else if (TempData["delete_success"] != null)
{
    <div class="success grid_12">
        <h3>Eliminar: @TempData["delete_success"].</h3>
        <a class="hide_btn" href="#"></a>
    </div>
}

@if (TempData["create_failure"] != null)
{
    <div class="error grid_12">
        <h3>Nuevo: @TempData["create_failure"].</h3>
        <a class="hide_btn" href="#"></a>
    </div>
}
else if (TempData["details_failure"] != null)
{
    <div class="error grid_12">
        <h3>Detalle: @TempData["create_fail"].</h3>
        <a class="hide_btn" href="#"></a>
    </div>
}
else if (TempData["edit_failure"] != null)
{
    <div class="error grid_12">
        <h3>Modificar: @TempData["edit_fail"].</h3>
        <a class="hide_btn" href="#"></a>
    </div>
}
else if (TempData["delete_failure"] != null)
{
    <div class="error grid_12">
        <h3>Eliminar: @TempData["delete_fail"].</h3>
        <a class="hide_btn" href="#"></a>
    </div>
}


<div class="block big">
    <div class="titlebar">
        <h3>Generar Arqueo de Caja</h3>
    </div>
    <div class="block_cont">

        <a href="/ArqueoDeCaja/Create" class="navbutton"><span class="icon_plus">Nuevo Arqueo</span></a>

        <table class="data-table">
            <thead>
                <tr>
                    <th>
                       @Html.DisplayName("Fecha de Arqueo")
                    </th>
                    <th>
                        @Html.DisplayName("Monto del Sistema")
                    </th>
                    <th>
                        @Html.DisplayName("Monto Físico")
                    </th>
                    <th>
                        @Html.DisplayName("Descuadre")
                    </th>
                    <th>
                        @Html.DisplayName("Operario")
                    </th>
                    <th></th>
                </tr>
            </thead>

            @foreach (var item in Model)
            {
                <tr>
                    <td>
                        @Html.DisplayFor(modelItem => item.FechaArqueo)
                    </td>
                    <td>
                        @Html.DisplayFor(modelItem => item.MontoSistema)
                    </td>
                    <td>
                        @Html.DisplayFor(modelItem => item.montoConteo)
                    </td>
                    <td>
                        @Html.DisplayFor(modelItem => item.Descuadre)
                    </td>
                    <td>
                        @Html.DisplayFor(modelItem => item.Operario)
                    </td>
                    <td>
                        <div style="height: 3px;"></div>
                        <div class="actionbar">
                            <a href=@string.Concat("/ArqueoDeCaja/Details/", item.IdArqueoCaja) class="action view"><span>Detalles</span></a>
                        </div>
                    </td>
                </tr>
            }
        </table>
    </div>
</div>
